package com.ddzh.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ddzh.mapper.ExportDataMapper;
import com.ddzh.pojo.ExportDataVo;
import com.ddzh.service.ExportDataService;
import com.ddzh.utils.DateUtil;
import org.apache.dubbo.config.annotation.Service;

@Service
public class ExportDataServiceImpl extends ServiceImpl<ExportDataMapper,ExportDataVo> implements ExportDataService {


    @Override
    public ExportDataVo getAllData() {



        ExportDataVo exportDataVo = new ExportDataVo();

        exportDataVo.setReportDate(DateUtil.getYesterday());
        exportDataVo.setTodayNewMember(this.baseMapper.findBycreateDate());
        exportDataVo.setTotalMember(this.baseMapper.findAllTotal());
        exportDataVo.setThisWeekNewMember(this.baseMapper.findMemberByWeek());
        exportDataVo.setThisMonthNewMember(this.baseMapper.findMemberByMonth());
        exportDataVo.setTodayOrderNumber(this.baseMapper.findOrderExamineByDay());
        exportDataVo.setTodayVisitsNumber(this.baseMapper.findOrderByDay());
        exportDataVo.setThisWeekOrderNumber(this.baseMapper.findOrderExamineByWeek());
        exportDataVo.setThisWeekVisitsNumber(this.baseMapper.findOrderByWeek());
        exportDataVo.setThisMonthOrderNumber(this.baseMapper.findOrderExamineByMonth());
       // exportDataVo.setThisMonthNewMember(this.baseMapper.findOrderExamineByMonth());
        exportDataVo.setThisMonthVisitsNumber(this.baseMapper.findOrderByMonth());
        exportDataVo.setHotSetmeal(this.baseMapper.findHotSetMeal());
        return exportDataVo;
        }



};

